import request from '@/http/request_admin'

// 登录方法
export async function login(username: string, password: string) {
	const data = {
		username,
		password
	}
	return await request({
		url: '/admin3/login',
		method: 'post',
		data: data,
	})
}

export async function getMenu() {
	return await request({
		url: '/admin3/resources/menu',
		method: 'get'
	})
}

export async function getMenuTree() {
	return await request({
		url: '/admin3/resources/tree',
		method: 'get'
	})
}

// 退出
export async function logout() {
	return await request({
		url: '/admin3/logout',
		method: 'post'
	})
}